﻿@page "/"

	<h1>BlazorPlus</h1>

BlazorPlus is a component library that helps you to write code more directly and easily.
<br />
<br />
Demo source  : <a href="https://github.com/BlazorPlus/BlazorPlusDemo" target="_blank">https://github.com/BlazorPlus/BlazorPlusDemo</a>
<br />
Main website : <a href="http://blazorplus.com" target="_blank">http://blazorplus.com</a>

<br />
<br />

@*Install-BlazorPlus*@

<button class="btn btn-info" @onclick="ShowHelloWorld">Hello World</button>
@code{
	void ShowHelloWorld()
	{
		BlazorSession.Current.Alert("Greeting", "Hello World");
	}
}


,

<button class="btn btn-info" @onclick="ShowPing">Ping Network Delay</button>
@code{
	async void ShowPing()
	{
		System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
		sw.Start();

		List<string>
	msgs = new List<string>
		();
		for (int i = 0; i < 5; i++)
		{
			sw.Restart();
			await BlazorSession.Current.EvalCodeAsync("console.log('ping')");
			msgs.Add(sw.ElapsedMilliseconds.ToString() + " ms");
			BlazorSession.Current.Toast(string.Join("\r\n", msgs.ToArray()), i == 4 ? 1000 : 3000, "mynetworkinfo");
		}
		sw = null;
	}
}

<hr />
<p>
	Click demo menu for more functions
</p>

@*<h4>Special samples:</h4>
	<a href="/Test_PeerChat">Chat Room</a>*@

<br />
<br />
<br />
